﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Extensions.Configuration;

namespace Common.Utility
{
    public class AppSetting
    {
        private static IConfiguration _configuration = null;

        public static string GetAppSetting(string key)
        {
            var val = _configuration[key];
            if (!string.IsNullOrEmpty(val))
            {
                return val;
            }
            return string.Empty;
        }

        public static void SetAppSetting(IConfiguration configuration)
        {
            _configuration = configuration;
        }
    }
}
